#include <string>
#include <iostream>

using namespace std;

class Result
{
public:
	int count, length, init_pos, skip;

	Result(){}
	Result(int c, int l, int i, int s)
	{
		count = c;
		length = l;
		init_pos = i;
		skip = s;
	}

	bool operator > (Result &res)
	{
		if(count > res.count)
			return true;
		else if(count == res.count && length > res.length)
			return true;
		else if(count == res.count && length == res.length
				&& init_pos > res.init_pos)
			return true;
		else if(count == res.count && length == res.length
				&& init_pos == res.init_pos && skip < res.skip)
			return true;
		else
			return false;
	}
};

string lake;

void get_result(int s, int len, Result &res)
{
	res.init_pos = s;
	res.skip = len;
	for(res.count = 0;;)
	{
		int pos = s + res.count * len;
		res.length = pos;
		if(lake[pos] != '.')
			break;
		res.count ++;
		if(s + res.count * len >= (int)lake.length())
			break;
	}
}

void solve()
{
	Result res = Result(0, 0, 0, lake.length() + 100);
	Result tmp;
	int pos, skip;
	for(int i = 0;i<(int)lake.length();++i)
	{
		for(int j =1;j<(int)lake.length();++j)
		{
			get_result(i, j, tmp);
			if(tmp > res)
			{
				res = tmp;

				pos = i;
				skip = j;
			}
		}
	}

	cout << pos << " " << skip << endl;
}
int main()
{
	while(cin >> lake)
	{
		if(lake == "END")
			break;

		solve();
	}
}
